#ifndef __USERLED_H__
#define __USERLED_H__

#include <rtthread.h>
#include <rtdevice.h>
#include <board.h> 
 
#define RUN_GPIO_PORT          GET_PIN(E, 15)	
#define NET4G_GPIO_PORT        GET_PIN(E, 14)
#define NET485_GPIO_PORT       GET_PIN(E, 13)
#define NETLORA_GPIO_PORT      GET_PIN(E, 12)
#define POWER_4G_PORT          GET_PIN(A, 12)

#define RUN_LED_ON()          rt_pin_write(RUN_GPIO_PORT, PIN_HIGH);
#define RUN_LED_OFF()         rt_pin_write(RUN_GPIO_PORT, PIN_LOW);
#define NET4G_LED_ON()        rt_pin_write(NET4G_GPIO_PORT, PIN_HIGH);
#define NET4G_LED_OFF()       rt_pin_write(NET4G_GPIO_PORT, PIN_LOW);
#define NET485LED_ON()        rt_pin_write(NET485_GPIO_PORT, PIN_HIGH);
#define NET485LED_OFF()       rt_pin_write(NET485_GPIO_PORT, PIN_LOW);
#define NETLORALED_ON()       rt_pin_write(NETLORA_GPIO_PORT, PIN_HIGH);
#define NETLORALED_OFF()      rt_pin_write(NETLORA_GPIO_PORT, PIN_LOW);
#define RESET_MODULE()        {rt_pin_write(POWER_4G_PORT, PIN_LOW); \
                               rt_thread_mdelay(2000);\
															 rt_pin_write(POWER_4G_PORT, PIN_HIGH); }


void LED_init(void);
void MX_RTC_Init(void);
void getrcttime(char *pttime);

#endif
